a1605692b8227378d2b048cd255d1f0a709811bd,xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/test/AbstractBridgedXWikiComponentTestCase.java,AbstractBridgedXWikiComponentTestCase,setUp,#,56
Before Change
.will(returnValue(null));
mockServletContext.stubs().method("getAttribute").with(eq("javax.servlet.context.tempdir"))
.will(returnValue(new File(System.getProperty("java.io.tmpdir"))));
mockServletContext.stubs().method("getResourceAsStream").with(eq("/WEB-INF/xwiki.cfg"))
.will(returnValue(null));
Mock mockCoreConfiguration = registerMockComponent(CoreConfiguration.class);
mockCoreConfiguration.stubs().method("getDefaultDocumentSyntax").will(returnValue(Syntax.XWIKI_1_0));
After Change
Mock mockServletContext = mock(ServletContext.class);
environment.setServletContext((ServletContext) mockServletContext.proxy());
mockServletContext.stubs().method("getResourceAsStream").will(returnValue(null));
mockServletContext.stubs().method("getResource").will(returnValue(null));
mockServletContext.stubs().method("getAttribute").with(eq("javax.servlet.context.tempdir"))
.will(returnValue(new File(System.getProperty("java.io.tmpdir"))));